package edu.lingnan.house.controller;

import edu.lingnan.house.pojo.TbAgent;
import edu.lingnan.house.pojo.TbBooking;
import edu.lingnan.house.pojo.TbHouse;
import edu.lingnan.house.service.AgentService_lxj;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class AgentController_lxj {

    @Autowired
    private AgentService_lxj agentService;

    //中介查找个人信息
    @GetMapping("/t1")
    public TbAgent testFindAgentSelf(String agentId){
        TbAgent agent = agentService.findSelfById(agentId);
        return agent;
    }

    //中介修改个人信息
    @PostMapping("/t2")
    public String testUpdateSelf(@RequestBody TbAgent agent){
        int row = agentService.updateMySelf(agent);
        return "ok";
    }
}
